import time
# import multiprocessing
from multiprocessing import Process

def sing(singer,sname):
    for i in range(5):
        print(f"{singer}正在唱{sname}")
        time.sleep(1)


def dance(dancer,dname):
    for i in range(10):
        print(f"{dancer}正在跳{dname}")
        time.sleep(1)

if __name__ == '__main__':
    # pro = multiprocessing.Process(target=sing)
    sing_pro = Process(target=sing,args=("凤凰传奇","月亮之上"))
    sing_pro.start()
    dance_pro = Process(target=dance,kwargs={"dancer":"迈克","dname":"太空漫步"})
    dance_pro.start()
    time.sleep(3)
    dance_pro.terminate()
    sing_pro.join()
    dance_pro.join()
    print("哇。。。。太棒了")

